import { MockMethod } from "vite-plugin-mock";

const mock: Array<MockMethod> = [
  {
    // 接口路径
    url: "/dev-api/api/v1/menus/routes",

    // 接口方法
    method: "get",

    // 返回数据
    response: () => {
      return {
        code: "00000",
        data: [
          {
            path: "/marketing",
            component: "Layout",
            redirect: "/marketing/holiday-marketing",
            meta: {
              title: "营销管理",
              icon: "coupon",
              hidden: false,
              roles: ["ADMIN"],
              keepAlive: true,
            },
            children: [
              {
                path: "group",
                component: "marketing/group/index",
                name: "group-activity",
                meta: {
                  title: "拼团活动",
                  icon: "peoples",
                  hidden: false,
                  roles: ["ADMIN"],
                  keepAlive: true,
                },
              },
              {
                path: "holiday-marketing",
                component: "marketing/holiday-marketing/index",
                name: "holiday-marketing",
                meta: {
                  title: "节日营销",
                  icon: "coupon",
                  hidden: false,
                  roles: ["ADMIN"],
                  keepAlive: true,
                },
              },
            ],
          },
          {
            path: "/system",
            component: "Layout",
            redirect: "/system/user",
            meta: {
              title: "系统管理",
              icon: "system",
              hidden: false,
              roles: ["ADMIN"],
              keepAlive: true,
            },
            children: [
              {
                path: "user",
                component: "system/user/index",
                name: "User",
                meta: {
                  title: "用户管理",
                  icon: "user",
                  hidden: false,
                  roles: ["ADMIN"],
                  keepAlive: true,
                },
              },
              {
                path: "role",
                component: "system/role/index",
                name: "Role",
                meta: {
                  title: "角色管理",
                  icon: "role",
                  hidden: false,
                  roles: ["ADMIN"],
                  keepAlive: true,
                },
              },
              {
                path: "menu",
                component: "system/menu/index",
                name: "Menu",
                meta: {
                  title: "菜单管理",
                  icon: "menu",
                  hidden: false,
                  roles: ["ADMIN"],
                  keepAlive: true,
                },
              },
              {
                path: "dept",
                component: "system/dept/index",
                name: "Dept",
                meta: {
                  title: "部门管理",
                  icon: "tree",
                  hidden: false,
                  roles: ["ADMIN"],
                  keepAlive: true,
                },
              },
              {
                path: "dict",
                component: "system/dict/index",
                name: "Dict",
                meta: {
                  title: "字典管理",
                  icon: "dict",
                  hidden: false,
                  roles: ["ADMIN"],
                  keepAlive: true,
                },
              },
            ],
          },
          {
            path: "/component",
            component: "Layout",
            meta: {
              title: "组件封装",
              icon: "menu",
              hidden: false,
              roles: ["ADMIN"],
              keepAlive: true,
            },
            children: [
              {
                path: "wang-editor",
                component: "demo/wang-editor",
                name: "WangEditor",
                meta: {
                  title: "富文本编辑器",
                  icon: "",
                  hidden: false,
                  roles: ["ADMIN"],
                  keepAlive: true,
                },
              },
              {
                path: "upload",
                component: "demo/upload",
                name: "Upload",
                meta: {
                  title: "图片上传",
                  icon: "",
                  hidden: false,
                  roles: ["ADMIN"],
                  keepAlive: true,
                },
              },
              {
                path: "icon-selector",
                component: "demo/icon-selector",
                name: "IconSelector",
                meta: {
                  title: "图标选择器",
                  icon: "",
                  hidden: false,
                  roles: ["ADMIN"],
                  keepAlive: true,
                },
              },
              {
                path: "dict-demo",
                component: "demo/dict",
                name: "DictDemo",
                meta: {
                  title: "字典组件",
                  icon: "",
                  hidden: false,
                  roles: ["ADMIN"],
                  keepAlive: true,
                },
              },
              {
                path: "taginput",
                component: "demo/taginput",
                name: "Taginput",
                meta: {
                  title: "标签输入框",
                  icon: "",
                  hidden: false,
                  roles: ["ADMIN"],
                  keepAlive: true,
                },
              },
              {
                path: "signature",
                component: "demo/signature",
                name: "Signature",
                meta: {
                  title: "签名",
                  icon: "",
                  hidden: false,
                  roles: ["ADMIN"],
                  keepAlive: true,
                },
              },
              {
                path: "table",
                component: "demo/table",
                name: "Table",
                meta: {
                  title: "表格",
                  icon: "",
                  hidden: false,
                  roles: ["ADMIN"],
                  keepAlive: true,
                },
              },
            ],
          },
        ],
        msg: "ok",
      };
    },
  },
];

export default mock;
